package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.business.entity.ShopAvgEvaluationEntity;
import com.yuanfeng.commoms.dto.shop.ShopEvaluationDTO;
import com.yuanfeng.commoms.dto.shop.ShopPercentDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * @ClassName ShopAvgEvaluationMapper
 * @Description 店铺评分发货速度平均表
 * @Author cyp
 * @Date 2023-05-26 11:18:16
 * @Version 1.0
 **/
@Mapper
public interface ShopAvgEvaluationMapper extends BaseMapper<ShopAvgEvaluationEntity> {

    /**
     * 店铺评分
     *
     * @param shopId
     * @return
     */
    ShopEvaluationDTO shopScore(Integer shopId);

    /**
     * 查询店铺平均评分
     *
     * @param servicecreditScore
     * @param desccreditScore
     * @param deliverycreditScore
     * @return
     */
    ShopPercentDTO queryShopPercent(@Param("servicecreditScore") Double servicecreditScore, @Param("desccreditScore") Double desccreditScore, @Param("deliverycreditScore") Double deliverycreditScore);

    /**
     * 查询店铺发货时长
     * @param shopId
     * @return
     */
    BigDecimal queryShippingTime(@Param("shopId")Integer shopId);



}
